function addEventListeners(url,coutroller,type) {
	$('#showWindowButton').click(function() {
		postData={};
		if(type=='qzf'){	
			postData={"userId":$("#hidIsReferralId").val(),	"perserteeId":$("#hidRferralId").val(),	"accepterId":$("#hidFriendId").val(),"dynamicShowType":$("#dynamicShowType").val(),	"twContent":$("#twContent").val()}
			$.post(url +coutroller,postData, function(data) {
				$("#dialogDiv").wjDialog({url:url,content:data.msg});
				$('#wjWindow').jqxWindow('close');
			}, "json");
		}else if(type=="morePic"){
			$('#file_upload').uploadify('settings');
			$('#file_upload').uploadify('upload','*');
			//'uploader' :url+ 'assets/images/photowall/uploadify.php',
		}
		
		
	});
	$('#hideWindowButton').click(function(){
		$('#wjWindow').jqxWindow('close');
		
	});
	$('#wjWindow').on('close', function (event) {
		$('#wjWindow').jqxWindow('destroy');
		
	}); 
	
}
function createElements(theme) {
	$('#wjWindow').jqxWindow({
		autoOpen : true,
		maxHeight : 350,
		maxWidth : 600,
		minHeight : 350,
		minWidth : 600,
		theme : theme,
		resizable : false,
		isModal : true,
		dragArea: { left:330, top:300,height : 350,	width : 600,},
		modalOpacity : 0.6,	
	});
	
}
